\hypertarget{classImage}{\section{Image类 参考}
\label{classImage}\index{Image@{Image}}
}
\subsection*{静态 Public 成员函数}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{classImage_aff7676c0522073ede4838b1491000084}{get\-Image\-Info} (\$img)
\item 
static \hyperlink{classImage_aeaafafa7890673452b4c2a017ef36bdb}{water} (\$source, \$water, \$savename=null, \$alpha=80)
\item 
\hypertarget{classImage_a082b192cae11f062f56a8be4bc6ff197}{static {\bfseries show\-Img} (\$img\-File, \$text='', \$x='10', \$y='10', \$alpha='50')}\label{classImage_a082b192cae11f062f56a8be4bc6ff197}

\item 
static \hyperlink{classImage_a798afb8910fc93d0b622c3e495becab9}{thumb} (\$image, \$thumbname, \$type='', \$max\-Width=200, \$max\-Height=200, \$interlace=true)
\item 
static \hyperlink{classImage_a6f53a0923dcdf65ba963004946e21c1d}{thumb2} (\$image, \$thumbname, \$type='', \$max\-Width=200, \$max\-Height=50, \$interlace=true)
\item 
static \hyperlink{classImage_a2ebcde07018d1116b42a6c0d0e697dc7}{build\-String} (\$string, \$size=array(), \$font=array(), \$filename='', \$rgb=array(), \$type='png', \$disturb=3, \$border=true)
\item 
static \hyperlink{classImage_ace441affb437449e5252e4ade1d188ed}{show\-A\-S\-C\-I\-I\-Img} (\$image, \$string='', \$type='')
\item 
static \hyperlink{classImage_a1a51c9ccb2b1e059c8c35748d94c986c}{U\-P\-C\-A} (\$code, \$type='png', \$lw=2, \$hi=100)
\item 
\hypertarget{classImage_abb7982f6b32b30e736f38290d21c62dd}{static {\bfseries output} (\$im, \$type='png', \$filename='')}\label{classImage_abb7982f6b32b30e736f38290d21c62dd}

\end{DoxyCompactItemize}


\subsection{详细描述}
图像操作类库 thinkphp \begin{DoxyAuthor}{作者}
liu21st \href{mailto:liu21st@gmail.com}{\tt liu21st@gmail.\-com} 
\end{DoxyAuthor}


\subsection{成员函数说明}
\hypertarget{classImage_a2ebcde07018d1116b42a6c0d0e697dc7}{\index{Image@{Image}!build\-String@{build\-String}}
\index{build\-String@{build\-String}!Image@{Image}}
\subsubsection[{build\-String}]{\setlength{\rightskip}{0pt plus 5cm}static Image\-::build\-String (
\begin{DoxyParamCaption}
\item[{}]{\$string, }
\item[{}]{\$size = {\ttfamily array()}, }
\item[{}]{\$font = {\ttfamily array()}, }
\item[{}]{\$filename = {\ttfamily ''}, }
\item[{}]{\$rgb = {\ttfamily array()}, }
\item[{}]{\$type = {\ttfamily 'png'}, }
\item[{}]{\$disturb = {\ttfamily 3}, }
\item[{}]{\$border = {\ttfamily true}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classImage_a2ebcde07018d1116b42a6c0d0e697dc7}
根据给定的字符串生成图像

public 
\begin{DoxyParams}[1]{参数}
string & {\em \$string} & 字符串 \\
\hline
array | string & {\em \$size} & 图像大小 width,height 或者 array(width,height) \\
\hline
array | string & {\em \$font} & 字体信息 fontface,fontsize 或者 array(fontface,fontsize) \\
\hline
string & {\em \$filename} & \\
\hline
array & {\em \$rgb} & \\
\hline
string & {\em \$type} & 图像格式 默认\-P\-N\-G \\
\hline
integer & {\em \$disturb} & 是否干扰 1 点干扰 2 线干扰 3 复合干扰 0 无干扰 4 间断直线 \\
\hline
bool & {\em \$border} & 是否加边框 array(color) \\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{异常}
{\em \hyperlink{classAbnormal}{Abnormal}} & \\
\hline
\end{DoxyExceptions}
\begin{DoxyReturn}{返回}
string 
\end{DoxyReturn}
\hypertarget{classImage_aff7676c0522073ede4838b1491000084}{\index{Image@{Image}!get\-Image\-Info@{get\-Image\-Info}}
\index{get\-Image\-Info@{get\-Image\-Info}!Image@{Image}}
\subsubsection[{get\-Image\-Info}]{\setlength{\rightskip}{0pt plus 5cm}static Image\-::get\-Image\-Info (
\begin{DoxyParamCaption}
\item[{}]{\$img}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classImage_aff7676c0522073ede4838b1491000084}
取得图像信息

public 
\begin{DoxyParams}{参数}
{\em \$img} & \\
\hline
\end{DoxyParams}
\hypertarget{classImage_ace441affb437449e5252e4ade1d188ed}{\index{Image@{Image}!show\-A\-S\-C\-I\-I\-Img@{show\-A\-S\-C\-I\-I\-Img}}
\index{show\-A\-S\-C\-I\-I\-Img@{show\-A\-S\-C\-I\-I\-Img}!Image@{Image}}
\subsubsection[{show\-A\-S\-C\-I\-I\-Img}]{\setlength{\rightskip}{0pt plus 5cm}static Image\-::show\-A\-S\-C\-I\-I\-Img (
\begin{DoxyParamCaption}
\item[{}]{\$image, }
\item[{}]{\$string = {\ttfamily ''}, }
\item[{}]{\$type = {\ttfamily ''}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classImage_ace441affb437449e5252e4ade1d188ed}
把图像转换成字符显示

public 
\begin{DoxyParams}[1]{参数}
string & {\em \$image} & 要显示的图像 \\
\hline
string & {\em \$string} & \\
\hline
string & {\em \$type} & 图像类型，默认自动获取 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
string 
\end{DoxyReturn}
\hypertarget{classImage_a798afb8910fc93d0b622c3e495becab9}{\index{Image@{Image}!thumb@{thumb}}
\index{thumb@{thumb}!Image@{Image}}
\subsubsection[{thumb}]{\setlength{\rightskip}{0pt plus 5cm}static Image\-::thumb (
\begin{DoxyParamCaption}
\item[{}]{\$image, }
\item[{}]{\$thumbname, }
\item[{}]{\$type = {\ttfamily ''}, }
\item[{}]{\$max\-Width = {\ttfamily 200}, }
\item[{}]{\$max\-Height = {\ttfamily 200}, }
\item[{}]{\$interlace = {\ttfamily true}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classImage_a798afb8910fc93d0b622c3e495becab9}
生成缩略图

public 
\begin{DoxyParams}[1]{参数}
string & {\em \$image} & 原图 \\
\hline
string & {\em \$thumbname} & 缩略图文件名 \\
\hline
string & {\em \$type} & 图像格式 \\
\hline
int | string & {\em \$max\-Width} & 宽度 \\
\hline
int | string & {\em \$max\-Height} & 高度 \\
\hline
boolean & {\em \$interlace} & 启用隔行扫描 \\
\hline
\end{DoxyParams}
\hypertarget{classImage_a6f53a0923dcdf65ba963004946e21c1d}{\index{Image@{Image}!thumb2@{thumb2}}
\index{thumb2@{thumb2}!Image@{Image}}
\subsubsection[{thumb2}]{\setlength{\rightskip}{0pt plus 5cm}static Image\-::thumb2 (
\begin{DoxyParamCaption}
\item[{}]{\$image, }
\item[{}]{\$thumbname, }
\item[{}]{\$type = {\ttfamily ''}, }
\item[{}]{\$max\-Width = {\ttfamily 200}, }
\item[{}]{\$max\-Height = {\ttfamily 50}, }
\item[{}]{\$interlace = {\ttfamily true}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classImage_a6f53a0923dcdf65ba963004946e21c1d}
+-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/--- 生成特定尺寸缩略图 解决原版缩略图不能满足特定尺寸的问题 P\-S：会裁掉图片不符合缩略图比例的部分 +-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/---

public +-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/--- 
\begin{DoxyParams}[1]{参数}
string & {\em \$image} & 原图 \\
\hline
string & {\em \$thumbname} & 缩略图文件名 \\
\hline
string & {\em \$type} & 图像格式 \\
\hline
int | string & {\em \$max\-Width} & 宽度 \\
\hline
int | string & {\em \$max\-Height} & 高度 \\
\hline
boolean & {\em \$interlace} & 启用隔行扫描 +-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/--- \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
void +-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/--- 
\end{DoxyReturn}
\hypertarget{classImage_a1a51c9ccb2b1e059c8c35748d94c986c}{\index{Image@{Image}!U\-P\-C\-A@{U\-P\-C\-A}}
\index{U\-P\-C\-A@{U\-P\-C\-A}!Image@{Image}}
\subsubsection[{U\-P\-C\-A}]{\setlength{\rightskip}{0pt plus 5cm}static Image\-::\-U\-P\-C\-A (
\begin{DoxyParamCaption}
\item[{}]{\$code, }
\item[{}]{\$type = {\ttfamily 'png'}, }
\item[{}]{\$lw = {\ttfamily 2}, }
\item[{}]{\$hi = {\ttfamily 100}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classImage_a1a51c9ccb2b1e059c8c35748d94c986c}
生成\-U\-P\-C-\/\-A条形码


\begin{DoxyParams}[1]{参数}
 & {\em \$code} & \\
\hline
string & {\em \$type} & 图像格式 \\
\hline
int | string & {\em \$lw} & 单元宽度 \\
\hline
int | string & {\em \$hi} & 条码高度 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
string 
\end{DoxyReturn}
\hypertarget{classImage_aeaafafa7890673452b4c2a017ef36bdb}{\index{Image@{Image}!water@{water}}
\index{water@{water}!Image@{Image}}
\subsubsection[{water}]{\setlength{\rightskip}{0pt plus 5cm}static Image\-::water (
\begin{DoxyParamCaption}
\item[{}]{\$source, }
\item[{}]{\$water, }
\item[{}]{\$savename = {\ttfamily null}, }
\item[{}]{\$alpha = {\ttfamily 80}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classImage_aeaafafa7890673452b4c2a017ef36bdb}
为图片添加水印 public 
\begin{DoxyParams}[1]{参数}
string & {\em \$source} & 原文件名 \\
\hline
string & {\em \$water} & 水印图片 \\
\hline
null & {\em \$savename} & \\
\hline
int | string & {\em \$alpha} & 水印的透明度 \\
\hline
\end{DoxyParams}


该类的文档由以下文件生成\-:\begin{DoxyCompactItemize}
\item 
templi/Image.\-class.\-php\end{DoxyCompactItemize}
